
#include "SuperSonicInlet.h"
#include "CFDProblem.h"

template<>
InputParameters validParams<SuperSonicInlet>()
{
	InputParameters params = validParams<FarFieldBC>();
	return params;
}

SuperSonicInlet::SuperSonicInlet(const InputParameters & parameters):
	FarFieldBC(parameters)
{
}

void SuperSonicInlet::boundaryCondition()
{
    _cfd_data_neighbor.uh[0] = _rho_inf;
    _cfd_data_neighbor.uh[1] = _rho_inf*_vel_inf(0);
    _cfd_data_neighbor.uh[2] = _rho_inf*_vel_inf(1);
    _cfd_data_neighbor.uh[3] = _rho_inf*_vel_inf(2);
    _cfd_data_neighbor.uh[4] = _p_inf/(_gamma-1) + 0.5*_rho_inf*_vel_inf.norm_sq();
}
